<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<%@ include file="/module/orderField.jsp"%>

<style>

table label.error {
    margin-left: 5px;
    width: auto;
    display: inline;
    color: red;
}


</style>
</head>
<body>
     <form action="#" name="Form" id="Form" method="post">
            <input type="hidden" name="sqid" id="sqid"  value="${data.sqid}"/>
	     		<table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%">
			<tr>
				<td class="table-header" colspan="6">人民助学金申请</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 12%">姓名：</td>
				<td class="table-contentTD" style="width: 21%">${data.xm}</td>
				<td class="table-titleTD"  style="width: 12%">学号：</td>
				<td class="table-contentTD" style="width: 21%">${data.xh}</td>
				<td class="table-titleTD" style="width: 12%">性别：</td>
				<td class="table-contentTD" style="width: 22%">${data.xb}</td>
			</tr>
			<tr>
				<td class="table-titleTD">班级：</td>
				<td class="table-contentTD">${data.bjmc}</td>
				<td class="table-titleTD">专业：</td>
				<td class="table-contentTD">${data.zymc}</td>
				<td class="table-titleTD">年级：</td>
				<td class="table-contentTD">${data.njmc}</td>
			</tr>
			
			<tr>
			    <td class="table-titleTD">出生日期：</td>
				<td class="table-contentTD">${data.csrq1}</td>
				<td class="table-titleTD">民族：</td>
				<td class="table-contentTD"><select id="mz" name="mz"  class="selectList required">
						<option value="">请选择</option>
							 <c:forEach items="${nationList}" var="code">
								<option value="${code.codename}">${code.codename}</option>
							</c:forEach>
				</select></td>
				<td class="table-titleTD">联系电话:</td>
				<td class="table-contentTD">${data.lxdh}</td>
			</tr>
			
		     <tr>
		    	<td class="table-titleTD">是否团员：</td>
					<td class="table-contentTD"> 
					  <input type="radio" value="true"  name="sfty"  <c:if test="${data.sfty=='true'}">checked="checked"</c:if>/>是
					  <input type="radio" value="false" name="sfty" <c:if test="${data.sfty=='false'}">checked="checked"</c:if>/>否
			    </td>
			    <td class="table-titleTD" >状态：</td>
				<td class="table-contentTD">
				<c:if test="${data.states==0}">未提交</c:if>
				<c:if test="${data.states==1}">审核退回</c:if>
				<c:if test="${data.states==2}">审核中</c:if>
				<c:if test="${data.states==3}">审核通过</c:if>
				<c:if test="${data.states==8}">退回并结束</c:if>
				<c:if test="${data.states==9}">撤回</c:if>
				</td>
				<td class="table-titleTD">申请时间：</td>
				<td class="table-contentTD"><fmt:formatDate value="${data.createtime}" pattern="yyyy-MM-dd"/> </td>
			</tr>
			
			<tr>
		    	<td class="table-titleTD">申报项目：</td>
			    <td colspan="6" class="table-contentTD" style="color: #000000" >
					 <label><input  type="checkbox"  name="sbxm1" value="代收费" />代收费</label>
					 <label><input type="checkbox"   name="sbxm1" value="材料费" />材料费</label>
					  <label><input type="checkbox"  name="sbxm1" value="服装费" />服装费</label>
					   <label><input type="checkbox"  name="sbxm1" value="月人民助学金" />月人民助学金</label>
					  <label><input type="checkbox"  name="sbxm1" value="驾训减免" />驾训减免</label>
					  <label><input type="checkbox"  name="sbxm1" value="特困补助" />特困补助</label>
					 </td>
			    
			</tr>
		
		
		   <tr>
				<td class="table-titleTD">家庭成员：</td>
				<td colspan="5">
				   <table cellpadding="0" cellspacing="0" border="0" class="table-border" width="100%">
					  <tr>
						<td class="table-titleTD"  style='text-align: center;'>姓名</td>
						<td class="table-titleTD"  style='text-align: center;'>年龄</td>
						<td class="table-titleTD"  style='text-align: center;'>与本人关系</td>
					    <td class="table-titleTD"  colspan="2"  style='text-align: center;'>工作或学习单位</td>
					   </tr>
					   
					     <c:choose>
						<c:when test="${not empty familyList}"> 
						    	<c:forEach items="${familyList}" var="family">
							      <tr>
										<td class="table-contentTD" style='text-align: center;'>${family.xm}</td>
										<td class="table-contentTD" style='text-align: center;'>${family.age}</td>
										<td class="table-contentTD"  style='text-align: center;'>${family.gx}</td>
										<td class="table-contentTD"  colspan="2" style='text-align: center;'>${family.gzdw}</td>
								   <tr>
									
							 </c:forEach>
						</c:when>
							<c:otherwise>  
                               <tr>
							        <td class="table-titleTD" colspan="5" style="text-align: center;">无家庭成员信息</td>
							    </tr>	
							</c:otherwise> 
					    </c:choose> 
			       </table>
				</td>
			</tr>
			
			
			<%-- <tr>
			  <td class="table-titleTD" colspan="6" style="text-align: left;">家庭成员情况：</td>
			</tr>
			
					<tr>
						<td class="table-titleTD" colspan="2" style='text-align: center;'>姓名</td>
						<td class="table-titleTD"  style='text-align: center;'>年龄</td>
						<td class="table-titleTD" style='text-align: center;'>与本人关系</td>
					    <td class="table-titleTD"  colspan="2"  style='text-align: center;'>工作或学习单位</td>
					</tr>
					
				   <c:choose>
						<c:when test="${not empty familyList}"> 
						    	<c:forEach items="${familyList}" var="family">
							      <tr>
										<td class="table-contentTD"  colspan="2"style='text-align: center;'>${family.xm}</td>
										<td class="table-contentTD" style='text-align: center;'>${family.age}</td>
										<td class="table-contentTD"  style='text-align: center;'>${family.gx}</td>
										<td class="table-contentTD"  colspan="2" style='text-align: center;'>${family.gzdw}</td>
								   <tr>
							 </c:forEach>
						</c:when>
							<c:otherwise>  
                               <tr>
							        <td class="table-titleTD" colspan="6" style="text-align: center;">无家庭成员信息</td>
							    </tr>	
							</c:otherwise> 
					</c:choose>  --%>
			  <tr>
					<td class="table-titleTD">户籍性质：</td>
				 <td class="table-contentTD"> 
					  <input type="radio" value="农业户口"  name="hjxz"  <c:if test="${data.hjxz=='农业户口'}">checked="checked"</c:if>/>农业户口
					  <input type="radio" value="非农业户口" name="hjxz" <c:if test="${data.hjxz=='非农业户口'}">checked="checked"</c:if>/>非农业户口
			    </td>
			    
				 <td class="table-titleTD">家庭年收入:</td>
				<td class="table-contentTD">${data.jtnsr}</td>
				
			   <td class="table-titleTD">人均年收入:</td>
				<td class="table-contentTD">${data.rjnsr}</td>
			 </tr>
			 
			 
			  <tr>
				<td class="table-titleTD">主要收入来源:</td>
				<td class="table-contentTD"  colspan="3">${data.zysrly}</td>
				
				<td class="table-titleTD">家庭人口总数：</td>
				<td class="table-contentTD">${data.jtrkzs}</td>
			 </tr>
			 
			<tr>
				<td class="table-titleTD">家庭地址:</td>
				<td class="table-contentTD" colspan="3">${data.jtdz}</td>
				<td class="table-titleTD">邮政编码:</td>
				<td class="table-contentTD">${data.yzbm}</td>
			 </tr>
			
			<tr>
				<td class="table-titleTD">申请助学金理由:</td>
				<td class="table-contentTD" colspan="6" style="width: 100%">${data.sqly}</td>
			</tr>
		</table>
		</form>
		<br />
		
		<br />
		<br />
		<c:if test="${data.states!=0}">
			<table cellpadding="0" cellspacing="0" border="0" class="table-border" width="95%">
				<tr>
					<td class="table-header" colspan="6">审批结果</td>
				</tr>
				<tr>
					<td class="table-titleTD" style="text-align: center;">序号</td>
					<td class="table-titleTD" style="text-align: center;">审批人</td>
					<td class="table-titleTD"  style="text-align: center;">审批步骤</td>
					<td class="table-titleTD" style="text-align: center;">审批结果</td>
					<td class="table-titleTD" style="text-align: center;">审批时间</td>
					<td class="table-titleTD" style="text-align: center;">审批意见</td>
				</tr>
				<c:forEach items="${chekResultList}" var="res" varStatus="status">
				<tr>
					<td class="table-contentTD" style="text-align: center;">${status.index+1}</td>
					<td class="table-contentTD" style="text-align: center;">${res.userName}</td>
					<td class="table-contentTD"  style="text-align: center;">${res.stepName}</td>
					<td class="table-contentTD" style="text-align: center;">${res.userState}</td>
					<td class="table-contentTD" style="text-align: center;">${res.approvalTime}</td>
					<td class="table-contentTD" style="text-align: center;">${res.comments}</td>
				</tr>
				</c:forEach>
		   </table>
		</c:if>
		
		<br />
		<br />
		<table cellpadding="1" cellspacing="1" border="0" align="left">
			<tr>
			    <c:if test="${data.states==0 or data.states==1}">
			            <td><input type="button" id="btnSubmit" class="inputButton" style="text-align: center;" value="提交" autocomplete="off"  /></td>
			            <td><input type="button" id="btnSave" class="inputButton" style="text-align: center;" value="修改" autocomplete="off"   /></td>
				</c:if>
			        	<td><input type="button" id="returnBut"  class="inputButton" value="返回"  style="text-align: center;" autocomplete="off"  /></td>
			</tr>
		</table>
		<script>
			$(document).ready(function() {
				  $("#btnSave").click(function() {
					   window.location.href ="${basePath}/zxjStudentPeopleGrant/updateToview?id="+ $("#sqid").val();
		 		  });
				  
				  
				   //提交
			  		$("#btnSubmit")
							.click(
									function() {
										   $("#btnSubmit").attr("disabled",true);
									 layer.confirm("您是否确定提交吗?",{icon : 3,title : '提示',skin : 'layer-ext-moon'
										},function(index) {
											document.Form.action = "${basePath}/zxjStudentPeopleGrant/btnSubmit?id="+ $("#sqid").val();
											document.Form.submit();	 	 
									  },function(index) {
										  layer.close(index);
										   $("#btnSubmit").attr("disabled",false);
										});	
									});
				
				  $("#returnBut").click(function() {
		 			 window.location.href='${basePath}/zxjStudentPeopleGrant/index';
		 		  });
			});
		     compareListValue(document.getElementById('mz'),'${data.mz}');
 			 $("input[type='checkbox']").attr('disabled','disabled');
 			 $("input[type='radio']").attr('disabled','disabled');
 		     $("select").each(function () {
 				　　$("#" + this.id).attr("disabled", true);
 			 });
 		      var sbxm="${data.sbxm}";
 		      var sbxm1 = sbxm.split(",");
 		      for(var i=0;i<sbxm1.length;i++){
 		    	   $("input[name='sbxm1'][value="+sbxm1[i]+"]").attr("checked","checked");
 		      }
 			 
</script>
</body>
</html>
